
import Layout from '@/layout'

const apps = [
  {
    path: '/clue',
    name: 'Clue',
    component: Layout,
    children: [
      {
        path: '',
        name: 'ClueList',
        component: () => import('@/views/clue'),
        meta: { title: '线索', icon: 'el-icon-s-home', affix: true }
      },
      {
        path: 'info',
        name: 'ClueInfo',
        component: () => import('@/views/clue/info'),
        meta: { title: '线索详情', icon: 'el-icon-s-home', affix: true }
      }
    ]
  },
  {
    path: '/customer',
    name: 'Customer',
    component: Layout,
    children: [
      {
        path: '',
        name: 'CustomerList',
        component: () => import('@/views/customer'),
        meta: { title: '客户', icon: 'el-icon-s-home', affix: true }
      },
      {
        path: 'add',
        name: 'CustomerAdd',
        component: () => import('@/views/customer/add'),
        meta: { title: '新增客户', icon: 'el-icon-s-home', affix: true }
      },
      {
        path: 'update',
        name: 'CustomerUpdate',
        component: () => import('@/views/customer/add'),
        meta: { title: '修改客户', icon: 'el-icon-s-home', affix: true }
      },
      {
        path: 'info',
        name: 'CustomerInfo',
        component: () => import('@/views/customer/info'),
        meta: { title: '修改详情', icon: 'el-icon-s-home', affix: true }
      }
    ]

  },
  {
    path: '/contacts',
    name: 'Contacts',
    component: Layout,
    children: [
      {
        path: '',
        name: 'ContactsList',
        component: () => import('@/views/contacts'),
        meta: { title: '联系人', icon: 'el-icon-s-home', affix: true }
      },
      {
        path: 'info',
        name: 'ContactsInfo',
        component: () => import('@/views/contacts/info'),
        meta: { title: '联系详情', icon: 'el-icon-s-home', affix: true }
      }
    ]
  },
  {
    path: '/chance',
    name: 'Chance',
    component: Layout,
    children: [
      {
        path: '',
        name: 'ChanceList',
        component: () => import('@/views/chance'),
        meta: { title: '商机', icon: 'el-icon-s-home', affix: true }
      },
      {
        path: 'info',
        name: 'ChangeInfo',
        component: () => import('@/views/chance/info'),
        meta: { title: '商机详情', icon: 'el-icon-s-home', affix: true }
      }
    ]

  },
  {
    path: '/quote',
    name: 'Quote',
    component: Layout,
    children: [
      {
        path: '',
        name: 'quoteList',
        component: () => import('@/views/quote'),
        meta: { title: '报价', icon: 'el-icon-s-home', affix: true }
      },
      {
        path: 'info',
        name: 'quoteInfo',
        component: () => import('@/views/quote/info'),
        meta: { title: '报价', icon: 'el-icon-s-home', affix: true }
      },
      {
        path: 'add',
        name: 'quoteAdd',
        component: () => import('@/views/quote/add'),
        meta: { title: '新增报价', icon: 'el-icon-s-home', affix: true }
      },
      {
        path: 'update',
        name: 'quoteUpdate',
        component: () => import('@/views/quote/add'),
        meta: { title: '编辑报价', icon: 'el-icon-s-home', affix: true }
      }
    ]

  },
  {
    path: '/order',
    name: 'Quote',
    component: Layout,
    children: [
      {
        path: '',
        name: 'quoteList',
        component: () => import('@/views/order'),
        meta: { title: '订单', icon: 'el-icon-s-home', affix: true }
      },
      {
        path: 'info',
        name: 'orderInfo',
        component: () => import('@/views/order/info'),
        meta: { title: '订单', icon: 'el-icon-s-home', affix: true }
      },
      {
        path: 'add',
        name: 'orderAdd',
        component: () => import('@/views/order/add'),
        meta: { title: '订单', icon: 'el-icon-s-home', affix: true }
      },
      {
        path: 'update',
        name: 'orderUpdate',
        component: () => import('@/views/order/add'),
        meta: { title: '订单', icon: 'el-icon-s-home', affix: true }
      }
    ]

  },
  {
    path: '/invoice',
    name: 'Invoice',
    component: Layout,
    children: [
      {
        path: '',
        name: 'invoiceList',
        component: () => import('@/views/invoice'),
        meta: { title: '开票', icon: 'el-icon-s-home', affix: true }
      },
      {
        path: 'info',
        name: 'invoiceInfo',
        component: () => import('@/views/invoice/info'),
        meta: { title: '开票详情', icon: 'el-icon-s-home', affix: true }
      }
    ]

  },
  {
    path: '/contract',
    name: 'Contract',
    component: Layout,
    children: [
      {
        path: '',
        name: 'contractList',
        component: () => import('@/views/contract'),
        meta: { title: '合同', icon: 'el-icon-s-home', affix: true }
      },
      {
        path: 'add',
        name: 'contractAdd',
        component: () => import('@/views/contract/add'),
        meta: { title: '合同', icon: 'el-icon-s-home', affix: true }
      },
      {
        path: 'update',
        name: 'contractUpdate',
        component: () => import('@/views/contract/add'),
        meta: { title: '合同', icon: 'el-icon-s-home', affix: true }
      },
      {
        path: 'info',
        name: 'contractInfo',
        component: () => import('@/views/contract/info'),
        meta: { title: '详情', icon: 'el-icon-s-home', affix: true }
      }
    ]

  },
  {
    path: '/payment',
    name: 'Payment',
    component: Layout,
    children: [
      {
        path: '',
        name: 'paymentList',
        component: () => import('@/views/payment'),
        meta: { title: '回款', icon: 'el-icon-s-home', affix: true }
      },
      {
        path: 'add',
        name: 'PaymentAdd',
        component: () => import('@/views/payment/add'),
        meta: { title: '回款', icon: 'el-icon-s-home', affix: true }
      },
      {
        path: 'update',
        name: 'PaymentUpdate',
        component: () => import('@/views/payment/add'),
        meta: { title: '回款', icon: 'el-icon-s-home', affix: true }
      },
      {
        path: 'info',
        name: 'PaymentInfo',
        component: () => import('@/views/payment/info'),
        meta: { title: '回款', icon: 'el-icon-s-home', affix: true }
      }

    ]

  },

  {
    path: '/sales_target',
    name: 'salesTarget',
    component: Layout,
    children: [
      {
        path: '',
        name: 'salesTargetList',
        component: () => import('@/views/sales_target/SalesTarget'),
        meta: { title: '目标设置', icon: 'el-icon-s-home', affix: true }
      },
      {
        path: 'targets',
        name: 'mySaleTarget',
        component: () => import('@/views/sales_target/myTarget'),
        meta: { title: '销售目标', icon: 'el-icon-s-home', affix: true }
      }
    ]
  },
  {
    path: '/report',
    name: 'Report',
    component: Layout,
    children: [
      {
        path: 'target',
        name: 'reportTargets',
        component: () => import('@/views/reports/saleTargets'),
        meta: { title: '销售业绩', icon: 'el-icon-s-home', affix: true }
      },
      {
        path: 'result',
        name: 'ReportResult',
        component: () => import('@/views/reports/saleResult'),
        meta: { title: '销售结果', icon: 'el-icon-s-home', affix: true }
      },
      {
        path: 'funnel',
        name: 'ReportFunnel',
        component: () => import('@/views/reports/saleFunnel'),
        meta: { title: '销售漏斗', icon: 'el-icon-s-home', affix: true }
      },
      {
        path: 'rank',
        name: 'ReportRank',
        component: () => import('@/views/reports/saleRank'),
        meta: { title: '销售业绩', icon: 'el-icon-s-home', affix: true }
      }
    ]
  }
]

export default apps
